package org.jeecg.modules.coucourseschedule.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jeecg.modules.coucourseschedule.entity.CouCourseSchedule;
import org.jeecg.modules.coucourseschedule.mapper.CouCourseScheduleMapper;
import org.jeecg.modules.coucourseschedule.service.ICouCourseScheduleService;
import org.jeecg.modules.coursescheduleatom.entity.CouCourseScheduleAtom;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: cou_course_schedule
 * @author: baochangrong
 * @Date: 2022-02-24
 * @Version: V1.0
 */
@Service
public class CouCourseScheduleServiceImpl extends ServiceImpl<CouCourseScheduleMapper, CouCourseSchedule> implements ICouCourseScheduleService {

    @Autowired
    private CouCourseScheduleMapper couCourseScheduleMapper;

    @Override
    public List<CouCourseSchedule> queryScheduleNameId() {
        return couCourseScheduleMapper.queryScheduleNameId();
    }

    @Override
    public List<CouCourseSchedule> queryByClassId(String classId) {
        QueryWrapper<CouCourseSchedule> queryWrapper = new QueryWrapper<CouCourseSchedule>();
        queryWrapper.likeRight("target_obj_id",classId).likeRight("course_schedule_ttype",1);
        return couCourseScheduleMapper.selectList(queryWrapper);
    }
}
